<?php $this->extend('template');?>

<?php $this->start('titre_page'); ?>
<?php echo __('List of countries'); ?>
<?php $this->end(); ?>

<?php $this->start('titre'); ?>
<h1><?php echo __('List of countries'); ?></h1>
<?php $this->end(); ?>

<div class="countries index">
	<h2><?php echo __('Countries'); ?></h2>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th><?php echo $this->Paginator->sort('id'); ?></th>
			<th><?php echo $this->Paginator->sort('name'); ?></th>
			<th><?php echo $this->Paginator->sort('continent_id'); ?></th>
			<th><?php echo $this->Paginator->sort('currency_id'); ?></th>
			<th><?php echo $this->Paginator->sort('photo_path'); ?></th>
			<th><?php echo $this->Paginator->sort('flag_path'); ?></th>
			<th><?php echo $this->Paginator->sort('center_latitude'); ?></th>
			<th><?php echo $this->Paginator->sort('center_longitude'); ?></th>
			<th><?php echo $this->Paginator->sort('nb_visits'); ?></th>
			<th><?php echo $this->Paginator->sort('created'); ?></th>
			<th><?php echo $this->Paginator->sort('modified'); ?></th>
			<th><?php echo $this->Paginator->sort('types_region_id'); ?></th>
			<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php foreach ($countries as $country): ?>
	<tr>
		<td><?php echo h($country['Country']['id']); ?>&nbsp;</td>
		<td><?php echo h($country['Country']['name']); ?>&nbsp;</td>
		<td>
			<?php echo $this->Html->link($country['Continent']['name'], array('controller' => 'continents', 'action' => 'view', $country['Continent']['id'])); ?>
		</td>
		<td>
			<?php echo $this->Html->link($country['Currency']['name_long'], array('controller' => 'currencies', 'action' => 'view', $country['Currency']['id'])); ?>
		</td>
		<td><?php echo h($country['Country']['photo_path']); ?>&nbsp;</td>
		<td><?php echo h($country['Country']['flag_path']); ?>&nbsp;</td>
		<td><?php echo h($country['Country']['center_latitude']); ?>&nbsp;</td>
		<td><?php echo h($country['Country']['center_longitude']); ?>&nbsp;</td>
		<td><?php echo h($country['Country']['nb_visits']); ?>&nbsp;</td>
		<td><?php echo h($country['Country']['created']); ?>&nbsp;</td>
		<td><?php echo h($country['Country']['modified']); ?>&nbsp;</td>
		<td>
			<?php echo $this->Html->link($country['TypesRegion']['name'], array('controller' => 'types_regions', 'action' => 'view', $country['TypesRegion']['id'])); ?>
		</td>
		<td class="actions">
			<?php echo $this->Html->link(__('View'), array('action' => 'view', $country['Country']['id'])); ?>
			<?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $country['Country']['id'])); ?>
			<?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $country['Country']['id']), null, __('Are you sure you want to delete # %s?', $country['Country']['id'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
	));
	?>	</p>
	<div class="paging">
	<?php
		echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
		echo $this->Paginator->numbers(array('separator' => ''));
		echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
	?>
	</div>
</div>

